//
//  CommitViewController.m
//  EasyBuy
//
//  Created by Zhu Xiangjun on 10/7/12.
//  Copyright (c) 2012 shen donghao. All rights reserved.
//

#import "CommitViewController.h"
#import "PictureScrollView.h"
#import "CommitTableView.h"

@interface CommitViewController (){
    PictureScrollView *pictureScrollView;
    CommitTableView   *commitTableView;
}

@end

@implementation CommitViewController

-(void)dealloc{
    [super dealloc];
    
}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {

    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    self.title = @"发布宝贝";
    
    self.view.backgroundColor = [UIColor grayColor];
    
    PictureScrollView *_pictureScrollView = [[PictureScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 80)];
    pictureScrollView = _pictureScrollView;
    [self.view addSubview:pictureScrollView];
    [_pictureScrollView release];
    
    CommitTableView *_commitTableView  = [[CommitTableView alloc] initWithFrame:CGRectMake(5, pictureScrollView.frame.origin.y+pictureScrollView.frame.size.height+5, 310, 280) style:UITableViewStyleGrouped];
    _commitTableView .contentSize = CGSizeMake(_commitTableView.frame.size.width, 520) ;
    commitTableView = _commitTableView;
    [self.view addSubview:commitTableView];
    [_commitTableView release];
}

- (void)viewDidUnload
{
    [super viewDidUnload];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end
